package com.zkw.group.service;

import com.zkw.group.entity.ProfesIndicatorOne;
import com.zkw.group.mapper.ProfesIndicatorOneMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProfesIndicatorOneService {

    @Autowired
    private ProfesIndicatorOneMapper profesIndicatorOneMapper;

    //获取一级指标列表
    public List<ProfesIndicatorOne> getAllIndicatorOneList(String findicname, int pageStart, int pageSize){
        return profesIndicatorOneMapper.getAllIndicatorOneList(findicname,pageStart,pageSize);
    }

    //获取一级指标条目数
    public int getIndicatorOneCounts(String findicname){
        return  profesIndicatorOneMapper.getIndicatorOneCounts(findicname);
    }

    //添加一级指标
    public int addIndicatorOne(ProfesIndicatorOne profesIndicatorOne){
        return profesIndicatorOneMapper.addIndicatorOne(profesIndicatorOne);
    }

    //删除指定一级指标
    public int deleteIndicatorOne(String findicname){
        return profesIndicatorOneMapper.deleteIndicatorOne(findicname);
    }

    //获取要更新的一级指标信息以及更新指定一级指标信息
    public ProfesIndicatorOne getUpdateIndicatorOne(String findicname){
        return profesIndicatorOneMapper.getUpdateIndicatorOne(findicname);
    }

    public int updateIndicatorOne(ProfesIndicatorOne profesIndicatorOne){
        return profesIndicatorOneMapper.updateIndicatorOne(profesIndicatorOne);
    }
}
